package fr.univnantes.lina.mlnlp.models.ml;

/**
 * 
 * @author hernandez
 *
 */
public class Feature {
	
	final static Double DEFAULT_VALUE = 1.0;
	
	private String name;
	private Object value;
	
	
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	/**
	 * set the name and replace all the whitespace character by a non ws char
	 * @param name the name to set
	 * 
	 */
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * @return the value
	 */
	public Object getValue() {
		return value;
	}
	/**
	 * @param value the value to set
	 */
	public void setValue(Object value) {
		this.value = value;
	}
	
	/**
	 * 
	 * @param alphabet
	 * @param value
	 */
	//	this.value = alphabet.getSymbolCode(value);
	//}
	
	/**
	 * 
	 */
	public Feature() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	/**
	 * 
	 * @param name
	 * @param value
	 */
	public Feature(String name) {
		super();
		this.setName(name);
		this.setValue(DEFAULT_VALUE);
	}
	
	/**
	 * @param name
	 * @param value
	 */
	public Feature(String name, Object value) {
		super();
		this.setName(name);
		this.setValue( value);
	}
	
	/**
	 * 
	 * @param name
	 * @param alphabet
	 * @param value
	 */
	/*public Feature(String name, Alphabet alphabet, Object value) {
		super();
		this.setName(name);
		setValue(alphabet,value);		
	}*/
	
}
